<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="root">
        
    </div>

    <script src="https://unpkg.com/react@18/umd/react.development.js" crossorigin></script>
    <script src="https://unpkg.com/react-dom@18/umd/react-dom.development.js" crossorigin></script>
    <script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script>


    <script type="text/babel">
        function random(start,end){
           if(!end){
                return parseInt(Math.random() * start)
            }
            return parseInt(Math.random() * (end - start + 1) + start)
        }
        const Letter = function(props){
            return <div style={props.style}>{props.children}</div>
        }
        const DivElement = function(){
            let letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";     
            let ary = letters.split("").map(function(ele){
                let style = {
                    width:"150px",
                    height:"150px",
                    backgroundColor: `rgb(${random(255)},${random(255)},${random(255)})`,
                    color:`rgb(${random(255)},${random(255)},${random(255)})`,
                    margin:"10px"};
                return <Letter style={style}>{ele}</Letter>
            });
            return <div style={{display:"flex"}}>
                    {ary}
                </div>
        }
        const root = ReactDOM.createRoot(document.getElementById("root"));
        root.render(<DivElement></DivElement>);
    </script>
</body>
</html>